Skip to content

Flip deprecation in XmlNode methods - #13032

Draft
elharo wants to merge 1 commit into
masterfrom
xmlnode
Draft

Flip deprecation in XmlNode methods#13032
elharo wants to merge 1 commit into
masterfrom
xmlnode

Conversation

@elharo

@elharo elharo commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Breaking this down into smaller chunks to make it work. This first piece just undeprecates the getter methods and deprecates the methods that don't use get. Since no code has changed, it should be safe.

part of #11582

@elharo elharo changed the title Flip deprecation Flip deprecation in XmlNode methods Sep 3, 2026
@gnodet

gnodet commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Closing this — the record-accessor naming (name(), value(), children()) is intentional and consistent with the Maven 4 API design for immutable value types.

See the detailed rationale on the issue: #11582 (comment)

In short: the noun-accessor pattern for immutable types is well established in the JDK itself (since Java 8/9, well before records), and XmlNode is an immutable value type by contract. Flipping the deprecation would break users who already migrated following the existing deprecation guidance, and create inconsistency with PathType, Lifecycle.Phase, OsService, CIInfo which all use the same pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants